import { mapState } from 'vuex'

const appMixin = { 
	  computed: {
		  ...mapState({
			  // 入参
			  socialRateBase: state => state.app.socialRateBase,
			  totalAmount: state => state.app.totalAmount,
			  socialSecuritySelected: state => state.app.socialSecuritySelected,
			  socialSecurityAmount: state => state.app.socialSecurityAmount,
			  socialSecurityRateList: state => state.app.socialSecurityRateList,
			  housingFundSelected: state => state.app.housingFundSelected,
			  housingFundAmount: state => state.app.housingFundAmount,
			  housingFundRate: state => state.app.housingFundRate,
			  specialDeductionAmount: state => state.app.specialDeductionAmount,
			  specialDeductionSelected: state => state.app.specialDeductionSelected,
			  cityCode: state => state.app.cityCode,
			  yearEndBoundAmount: state => state.app.yearEndBoundAmount,
			  // 出参
			  calcResp: state => state.app.calcResp,
			  socialSecurityInfo: state => state.app.calcResp.socialSecurityInfo || {},
			  housingFundInfo: state => state.app.calcResp.housingFundInfo || {},
			  taxCalcDetailList: state => state.app.calcResp.taxCalcDetailList || [],
			  taxRule: state => state.app.taxRule || {},
			  aloneYearEndBound: state => state.app.calcResp.aloneYearEndBound || {},
			  salarySummary: state => state.app.calcResp.salarySummary || {},
			  // 系统参数
			  Custom: state => state.app.SystemInfo.Custom || {},
			  CustomBar: state => state.app.SystemInfo.CustomBar || 0,
			  StatusBar: state => state.app.SystemInfo.StatusBar || 0,
		  })
	  }
}

export { appMixin }